package lib.bone.nepudata.dao;

import lib.bone.nepudata.domain.entity.NepuBook;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface NepuBookDAO extends JpaRepository<NepuBook,String> {
    Boolean existsByBookDictId(String dictId);

    List<NepuBook> findByIdIn(List<String> ids);

    /**
     * 根据著作教材名称和第一作者查询
     */
    Optional<NepuBook> findByBookNameAndFirstAuthor(String bookName,String firstAuthor);
}
